﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Mewdam.OAuth;
using System.Diagnostics;

namespace Mewdam.Mewdam
{
    public partial class timeline : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MewdamOAuth mo = new MewdamOAuth();




            mo.Parameters.oauth_token = Request.Cookies["Authorization"]["oauth_token"];
            mo.Parameters.oauth_token_secret = Request.Cookies["Authorization"]["oauth_secret"];

            mo.GetHomeTimeline("ulagogPCgxspCb2bxouyrw",
                "s24vXeTkPi1WyKXuq3kXJg1FpOIU92x2FQSRfjcs",
                (1).ToString(),
                (10).ToString()
                );
            string htmlString= Twitter.TwitterUtility.BuildReadableHtml(mo.Parameters.response_body);



            Response.Write("<a href=\"signoff.aspx\">注销</a><br />");
            Response.Write(htmlString);

            //HttpCookie cookie = Response.Cookies["Authorization"];
            HttpCookie cookie = Request.Cookies["Authorization"];
            cookie["oauth_token"] = mo.Parameters.oauth_token;
            cookie["oauth_secret"] = mo.Parameters.oauth_token_secret;



        }
    }
}